<div class="main">
  <el-form
    class="login-form"
    :model="userInfo"
    status-icon
    :rules="rules"
    ref="ruleForm"
    label-width="0px"
  >
    <el-form-item>
      <div class="title">粮食追溯系统</div>
    </el-form-item>
    <el-form-item prop="username">
      <el-input
        type="text"
        v-model="userInfo.username"
        placeholder="请输入用户名"
        autocomplete="off"
      ></el-input>
    </el-form-item>
    <el-form-item prop="password">
      <el-input
        type="password"
        v-model="userInfo.password"
        placeholder="请输入密码"
        autocomplete="off"
      ></el-input>
    </el-form-item>
    <el-form-item>
      <el-button
        :loading="loginLoading"
        :disabled="userInfo.username == '' || userInfo.password == ''"
        style="width: 100%;"
        type="primary"
        @click="submitForm('ruleForm')"
        >{{ loginLoading ? "登录中" : "登录" }}</el-button
      >
    </el-form-item>
  </el-form>
</div>
